package com.edu.edumanager.mapper;

import com.edu.edumanager.bean.EduCourse;
import com.edu.edumanager.vo.EduCourseInfo;
import com.edu.edumanager.vo.EduCourseVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface EduCourseMapper {

    /**
     * 增加course表 课程数据
     * @param course
     * @return
     */
    int addCourse(EduCourse course);

    /**
     * 查course表by id
     * @param courseId
     * @return
     */
    EduCourse findCourseById(Integer courseId);

    /**
     * 更新course表
     * @param course
     * @return
     */
    int updateCourse(EduCourse course);

    EduCourse getCourseTeacher(Integer courseId);

    int publishCourse(Integer courseId);

    List<EduCourseVo> findCourseByPage(@Param("index") int i,@Param("limit") Integer limit);

    int findCourseTotal();

    int deleteCourse(Integer courseId);
}